# Contributor: Thiago Perrotta <tbperrotta@gmail.com>
# Maintainer: Thiago Perrotta <tbperrotta@gmail.com>
pkgname=fpp
pkgver=0.9.5
pkgrel=0
pkgdesc="TUI that lets you pick paths out of its stdin and run arbitrary commands on them"
url="https://facebook.github.io/PathPicker"
arch="noarch"
license="MIT"
depends="bash python3"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/facebook/PathPicker/archive/$pkgver.tar.gz"
options="!check" # no test suite
builddir="$srcdir/PathPicker-$pkgver"

prepare() {
	default_prepare

	rm -r "src/tests"
}

package() {
	# library
	install -Dm755 fpp -t "$pkgdir"/usr/share/fpp
	cp -a src "$pkgdir"/usr/share/fpp

	# entrypoint
	install -dm755 "$pkgdir"/usr/bin
	ln -s /usr/share/fpp/fpp "$pkgdir"/usr/bin

	# documentation
	install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
	install -Dm644 debian/usr/share/man/man1/fpp.1 -t "$pkgdir"/usr/share/man/man1
}

sha512sums="
7ca94bfdbf8826a8143471acd63eaa80bd30ae3b27f5982f3e2b581e0d078a70bb189707a53d3f93f231ac0f3db8bb88b0c92441604661d475623bfbc2bebaa7  fpp-0.9.5.tar.gz
"
